//
// fixed.cpp
// libprotea
// Tools Library for the Protea Project / Fixed-precision arithmatic for Fields
// Copyright (C) 2003, 2004, 2005 eXegeSys, Inc.
// Copyright (C) 2008 Bruce A. James
//
// This program is part of the Protea Project.
//
// The Protea Project is free software; you can redistribute it and/or modify it 
// under the terms of the GNU General Public License as published by the 
// Free Software Foundation, either version 3 of the License, or (at your 
// option) any later version.
//
// The Protea Project is distributed in the hope that it will be useful, but 
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
// for more details.
// 
// You should have received a copy of the GNU General Public License along 
// with this program.  If not, see <http://www.gnu.org/licenses/>.
// 
// Please send correspondence to:
// 
// theproteaproject@gmail.com
//

// fixed.cpp
/*
#include "fixed.h"
#include <stdio.h>

CFixed::CFixed()
{
	low = 0;
	high = 0;
	scale = 0;
	positive = true;
};


CFixed CFixed::operator+( CFixed in )
{
	CFixed temp = *this;
	return temp;
};


CFixed CFixed::operator<<( int pos )
{
	CFixed temp = *this;
	temp.ShiftLeft( pos );
	return temp;
};


CFixed CFixed::operator>>( int pos )
{
	CFixed temp = *this;
	temp.ShiftRight( pos );
	return temp;
};


void CFixed::ShiftLeft( int pos )
{
	bool carry = false;
	int i;
	for ( i = 0; i < pos; i++ )
	{
		if ( low & 0x8000000000000000 )
			carry = true;
		low <<= 1;
		high <<= 1;
		if ( carry )
			high &= 0x0000000000000001;
		carry = false;
	}
};


void CFixed::ShiftRight( int pos )
{
	bool carry = false;
	int i;
	for ( i = 0; i < pos; i++ )
	{
		if ( high & 0x0000000000000001 )
			carry = true;
		low >>= 1;
		high >>= 1;
		if ( carry )
			low &= 0x8000000000000000;
		carry = false;
	}
};


void CFixed::ChangeScale( int s )
{
	if ( s - scale > 0 )
	{
		
	};
	if ( s - scale < 0 )
	{

	};
};

int main()
{
	CFixed me;
	me.low = 0xFFFFFFFFFFFFFFFF;

#ifdef _WIN32
	printf( "%I64x\n", me.low );
#else
	printf( "%lX%lX\n", (unsigned long)( me.low >> 32), ((unsigned long)( me.low & 0xFFFFFFFF)));
#endif

};
*/
